<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="false">

			<block slot="content">{{title}}</block>
		</cu-custom>

		<scroll-view scroll-x class="bg-white nav">
			<view class="flex text-center">
				<view class="cu-item flex-sub" :class="index==TabCur?'text-orange cur':''" v-for="(item,index) in msgList" :key="index"
				 @tap="tabSelect(index)" :data-id="index">
					{{item}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				TabCur: 0,
				msgList: ['通知', '私信', '公告'],
				title: '通知'
			}
		},
		onLoad() {

		},
		methods: {
			tabSelect(index) {
				this.TabCur = index;
				this.title = this.msgList[index]
				this.scrollLeft = (index - 1) * 60
			}
		}
	}
</script>

<style>
</style>
